class AdaptiveWindowing:
    def __init__(
        self,
        delta: float = 0.002,
        clock: int = 32,
        max_buckets: int = 5,
        min_window_length: int = 5,
        grace_period: int = 10,
    ) -> None: ...
    def get_n_detections(self) -> int: ...
    def get_width(self) -> float: ...
    def get_total(self) -> float: ...
    def get_variance(self) -> float: ...
    @property
    def variance_in_window(self) -> float: ...
    def update(self, value: float) -> bool: ...

class Bucket:
    def __init__(self, max_size: int) -> None: ...
    def clear_at(self, index: int) -> None: ...
    def insert_data(self, value: float, variance: float) -> None: ...
    def remove(self) -> None: ...
    def compress(self, n_elements: int) -> None: ...
    def get_total_at(self, index: int) -> float: ...
    def get_variance_at(self, index: int) -> float: ...
    def set_total_at(self, value: float, index: int) -> None: ...
    def set_variance_at(self, value: float, index: int) -> None: ...
